From: Yang, Wei Date: Sat, 28 May 2011 07:57:12 +0000 (+0100) Subject: x86/intel: Fix CPUID leaf 7 detection X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10264 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=6f1b7bcbb473e734eff8d105679a219c4c61081d;p=xen.git x86/intel: Fix CPUID leaf 7 detection Must set subleaf to 0 (input ECX==0). Signed-off-by: Yang, Wei Signed-off-by: Li, Xin --- diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c index 5e60a8e1e9..1a2062b5b2 100644 --- a/xen/arch/x86/cpu/common.c +++ b/xen/arch/x86/cpu/common.c @@ -262,9 +262,11 @@ void __cpuinit generic_identify(struct cpuinfo_x86 * c) } /* Intel-defined flags: level 0x00000007 */ - if ( c->cpuid_level >= 0x00000007 ) - c->x86_capability[X86_FEATURE_FSGSBASE / 32] - = cpuid_ebx(0x00000007); + if ( c->cpuid_level >= 0x00000007 ) { + u32 dummy; + cpuid_count(0x00000007, 0, &dummy, &ebx, &dummy, &dummy); + c->x86_capability[X86_FEATURE_FSGSBASE / 32] = ebx; + } early_intel_workaround(c);